home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
4_7.lha
/
4_7
/
4_7.c
next >
Wrap
Text File
|
1993-08-08
|
846b
|
38 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
ifdef TESTA
include "4_7A.h" /* class tnode */
include "4_7b.c" /* void addnode(tree, char*) */
endif
ifdef TESTB
include "4_7B.h" /* class tnode */
include "4_7e.c" /* void addnode(tree, char*) */
endif
include "4_7a.c" /* tree newtree() */
include "4_7c.c" /* void printtree(tree) */
include "4_7d.c" /* void aprinttree(tree) */
har *x[] =
"hello", "there", "this", "is", "a", "test", "of", "lists",
"the", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "black", "dog", 0
;
ain()
tree t = newtree();
for (char **xp = x; *xp; xp++)
addnode(t, *xp);
cout << "tree:\n";
printtree(t);
cout << "alphabetic tree:\n";
aprinttree(t);
return 0;